import Vue from 'vue'
import VueRouter from "vue-router"
Vue.use(VueRouter)
var router = new VueRouter({
  routes: [{
      //默认home页面
      path: '/',
      redirect: 'register',
    }, {
      // 首页
      name: 'Home',
      path: '/home',
      component: () => import('../pages/Home.vue'),
      meta: {
        showTabbar: true //默认没颜色
      }
    },
    // 注册
    {
      name: 'Register',
      path: '/register',
      component: () => import('../pages/Register.vue'),
      meta: {
        showTabbar: false //默认没颜色
      }
    },
    // 手机登录
    {
      name: 'Denglu',
      path: '/denglu',
      component: () => import('../pages/Denglu.vue'),
      meta: {
        showTabbar: false //默认没颜色
      }
    },
    // 账号密码登录
    {
      name: 'Zanghao',
      path: '/zanghao',
      component: () => import('../pages/Zanghao.vue'),
      meta: {
        showTabbar: false //默认没颜色
      }
    },
    // 分类
    {
      name: 'Fenlei',
      path: '/fenlei',
      component: () => import('../pages/Fenlei.vue'),
      meta: {
        showTabbar: true //默认没颜色
      }
    },
    // 购物车
    {
      name: 'Gouwuche',
      path: '/gouwuche',
      component: () => import('../pages/Gouwuche.vue'),
      meta: {
        showTabbar: true //默认没颜色
      }
    },
    // 我的
    {
      name: 'Wode',
      path: '/wode',
      component: () => import('../pages/Wode.vue'),
      meta: {
        showTabbar: true //默认没颜色
      }
    },
    // 详情
    {
      name: 'Detail',
      path: '/detail/:id',
      component: () => import('../pages/Detail.vue'),
      meta: {
        showTabbar: false, //默认没颜色
        title: "详情页11",
      }
    }, // 客服
    {
      name: 'Kefu',
      path: '/kefu',
      component: () => import('../pages/Kefu.vue'),
      meta: {
        showTabbar: false, //默认没颜色
      }
    },
    // 收货地址
    {
      name: 'Address',
      path: '/address',
      component: () => import('../pages/Address.vue'),
      meta: {
        showTabbar: false, //默认没颜色
      }
    },
  ]
})
export default router